<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="a web chat system by node.js">
    <meta name="author" content="phachon">
    <title><%= title %></title>
    <link rel="stylesheet" href="/css/bootstrap.min.css">
    <link rel="stylesheet" href="/css/bootstrap-theme.css">
    <link rel="stylesheet" href="/css/login.css">
    <link rel="stylesheet" href="/css/font-awesome.min.css">

    <script type="text/javascript" src="/js/plugins/jquery/jquery.min.js"></script>
    <script type="text/javascript" src="/js/plugins/bootstrap/bootstrap.min.js"></script>
    <script type="text/javascript" src="/js/plugins/bootstrap/bootstrap.min.js"></script>
    <script type="text/javascript" src="/js/plugins/jquery/jquery.form.js"></script>
    <script type="text/javascript" src="/js/module/login.js"></script>
</head>
<body>
<nav class="navbar navbar-fixed-top navbar-inverse" role="navigation">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="#">phaChat 聊天室</a>
        </div>
        <div id="navbar" class="collapse navbar-collapse">
            <ul class="nav navbar-nav">
                <li><a href="/">首页</a></li>
                <li><a href="/chat/index">聊天室</a></li>
                <li><a href="/about/index">关于</a></li>
            </ul>
            <ul class="nav navbar-nav navbar-right">
                <li><a href="/author/register"><span class="glyphicon glyphicon-registration-mark"></span> 注册 </a></li>
            </ul>
        </div>
    </div>
</nav>
<div class="login">
    <h3>Login phaChat</h3>
    <div id="failedMessage" class="alert alert-danger" style="display: none">
        <a href="#" class="close" data-dismiss="alert">&times;</a>
        <strong>error：</strong>
        <span></span>
    </div>
    <form method="post" action="/author/login" onsubmit="return false">
        <input type="text" name="username" placeholder="用户名" required="required" />
        <input type="password" name="password" placeholder="密码" required="required" />
        <button type="submit" class="btn btn-primary btn-block btn-large" onclick="Login.ajaxSubmit(this.form);"> 登录 </button>
    </form>
    <div style="margin-top: 20px">
        <p class="text-center" style="font-size: 13px;color: #3d61af; font-family: Arial;"><a href="/author/register">没有账号？》》点击注册</a></p>
    </div>
    <div class="modal fade" id="successModal">
        <div class="modal-dialog modal-sm">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                    <h4 class="modal-title">提示</h4>
                </div>
                <div class="modal-body">
                    <p>登录成功，点击进入聊天室...</p>
                </div>
                <div class="modal-footer">
                    <a type="button" class="btn btn-primary" href="/chat/index">
                        <span class="glyphicon glyphicon-log-in"></span> 聊天室
                    </a>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>